//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IFx.h>
///	@path	~/src/graphics/
///	@date	2008/12/23
///	@brief	.

#pragma once

#include "xeres.h"

#include "graphics/IDevice.h"

namespace xeres {

	/*! 
		\class	IFx
		\brief	Custom effect interface.
	*/
	class IFx : public IDeviceResource
	{
	public:

		/// \ctor
		IFx( void );

		/// \dtor
		virtual ~IFx( void );

		DECL_IOBJECT_INTERFACE( IFx , IDeviceResource );

	public:

		/// \name Effect Interface
		//@{

		/// \brief	Setup FX object.
		virtual bool SetupFx( RenderContext& rc ) = 0 ;

		/// \brief	Attach geometry to FX.
		virtual void AttachGeometry( RefWeak<IGeometry> geo ) = 0;

		/// \brief	Detach geometry from FX.
		virtual void DetachGeometry( RefWeak<IGeometry> geo ) = 0;

		/// \brief	Begin shading.
		virtual int BeginShading( RenderContext& rc ) = 0;

		/// \brief	End shading.
		virtual void EndShading( RenderContext& rc ) = 0;

		//@}

	};

} // namespace xeres
